package com.efast.dmom.equipment.controller.statemach;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//import com.efast.cafe.commponent.statemach.bean.TaskParamBean;
//import com.efast.cafe.commponent.statemach.service.IStatemMachAdapterService;
import com.efast.cafe.framework.bean.ResultBean;
import com.efast.cafe.framework.controller.AbstractController;

/**
 * 
 * @author 作者 Aaron Liu:
 * 
 * @version 创建时间：2019年8月14日 上午11:11:16
 * 
 *          类说明
 * 
 */
@Controller
@RequestMapping("/statemach")
public class EquipRepairOrderController extends AbstractController {

//	@Autowired
//	private JdbcDao jdbcDao;

	@Autowired
//	private IStatemMachAdapterService statemMachAdapterService;

	@RequestMapping(value = "/repairOrder/{type}")
	public @ResponseBody ResultBean createRepairOrder(HttpServletRequest request, HttpServletResponse response
			) {
//		@RequestBody EquipRepairOrderBean repairOrderBean,
//		 @PathVariable("type") String htype
				return null;

//		ResultBean result = new ResultBean(true, null);

//		try {
//			repairOrderBean.setCreateUser(SpringWebUtils.getRequestUser());
//			repairOrderBean.setLastUpdateTime(DateUtils.getCurrentDateTime());
//			repairOrderBean.setCompanyCode(SpringWebUtils.getRequestCompany());
//			repairOrderBean.setCreateTime(DateUtils.getCurrentDateTime());
//			
//			repairOrderService.createRepairOrder(repairOrderBean);
//			result.setObject(repairOrderBean);
//
//		} catch (Exception e) {
//			result.setSuccess(false);
//			if (e instanceof ServiceException) {
//				result.setErrorCode(e.getMessage());
//			} else {
//				result.setErrorCode(ResultStatus.SYS_ERROR.getCode());
//			}
//		}

//		TaskParamBean taskParam = new TaskParamBean();
		
//		JSONObject jsonObj = new JSONObject();
//
////		String cNo = jdbcDao.executeProcGetCode("WX", SpringWebUtils.getRequestCompany());
//		
//		taskParam.setConfId(Long.valueOf(1010));
//		taskParam.setParajson(jsonObj.toString());

//		try {
//			statemMachAdapterService.beginAdapter(taskParam, htype);
//		} catch (Exception e) {
			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}

//		return result;

	}

}
